home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: netcom.com!smryan
- From: smryan@netcom.com (@#$%!?!)
- Subject: Re: How to use assert( )
- Message-ID: <smryanDps8pF.87t@netcom.com>
- Organization: The Programmer formerly known as S M Ryan
- X-Newsreader: TIN [version 1.2 PL1]
- References: <4kc3k7$dur@orion.cybercom.net> <316be48b.3354928@news.netvision.net.il> <4kiirb$hll@sparcserver.lrz-muenchen.de> <smryanDpqBv7.E56@netcom.com> <dpmikese.14.005EA7C0@ingr.com>
- Date: Sat, 13 Apr 1996 04:05:39 GMT
- Sender: smryan@netcom2.netcom.com
-
- : >It is preferable to have the program fail mysteriously for the customer
- : >with possibly the only opportunity to diagnose it gone.
-
- : Not if you build in user-level debugging. For instance, your code could
- : check for the existence of an environment variable defined in the user's
- : environment - if it's there, you could write debug info somewhere that
-
- So you write a separate "check" routine to duplicate the functionality of
- "assert" except it is turned off by a secret feature instead of a #define?
-
- It still leaves the issue that what do you want to do if the program fails:
- Say mea culpa and write out enough information that the seller might
- actually track down the problem, or let the customer fume and fret over
- a mysteriously broken product? And just how easy is it duplicate (and
- identify) a bug in an interactive product?
-
- --
- The Queen, amused, in quiet power, | smryan@netcom.com PO Box 1563
- will draw the son to darkenned bower. | Cupertino, California
- Her face is fair, her fragrance rare, | (xxx)xxx-xxxx 95015
- with woven webs for wayward flower. | I don't use no smileys
-